/*
 *  $Id: MessengerOfDeathFeed.cs 1004 2010-05-03 11:50:53Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Darkness.Abilities {
    public class MessengerOfDeathFeed: AbilityCard<Creature> {
        public MessengerOfDeathFeed(): base("001_d_a_dm_feed") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Darkness;
            Target = CreatureTarget.OwnExceptSelf;
            AllowInTapped = true;
            TapCreatureAfterUse = false;
        }

        protected override void DoAction(TargetArgs<Creature> args) {
            Creature messenger = args.Caster as Creature;
            messenger.HealBy(NewDamage(args, DamageType.Regeneration, args.Target.MaxHealth));
            if (messenger.Disabled) messenger.State = CreatureState.Untapped;
            args.Target.InstantDeath();
        }
    }
}
